<template>
  <div>
    <div class="title animate__backInLeft animate__animated ">
      {{ title }}
    </div>
    <el-button>测试</el-button>

    <div class="list">
      <div class="item" v-for="(item,index) in moduleList">
        {{ item.module_name }}
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import {configInfo} from '@/api/index'

const moduleList = ref([])
const config = useRuntimeConfig()
console.log(config.name)
console.log(config.public.baseUrl)

const appConfig = useAppConfig()
console.log(appConfig,'appConfig')

const title = ref('这是首页')
const {data} = await useAsyncData('test', async () => {
  const response = await configInfo()
  return response
})
moduleList.value = data.value?.module_list

</script>


<style scoped lang="scss">
.title {
  color: $red;
}
</style>